/**
 * Created by vincent on 2017/6/16.
 */
moduleUtils.filter('cmShortText', function () {
    return function (text, num) {
        if (isNaN(num)) {
            num = 100;
        }
        if (StringUtils.isString(text)) {
            if (text.length > num) {
                return text.substr(0, num) + "......";
            } else {
                return text.substr(0, num);
            }
        } else {
            return text;
        }
    };
});